#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
const int N = 11, M = 1 << N, C = N * N;
int n, m, K;
ll f[N][C][M];
int cnt[M];
vector<int> legal_state;
vector<int> state_trans[M];

bool check(int state) { return !(state & state >> 1); }

int count(int state) {
  int res = 0;
  for (int i = 0; i < n; ++i) res += state >> i & 1;
  return res;
}

int main() {
  cin >> n >> K;
  for (int st = 0; st < 1 << n; ++st) {
    if (check(st)) {
      legal_state.push_back(st);
      cnt[st] = count(st);
    }
  }
  m = legal_state.size();
  for (auto cur_st : legal_state) {
    for (auto to_st : legal_state) {
      if (!(cur_st & to_st) && check(cur_st | to_st)) {
        state_trans[cur_st].push_back(to_st);
      }
    }
  }
  f[0][0][0] = 1;
  for (int i = 1; i <= n; ++i) {
    for (int j = 0; j <= K; ++j) {
      for (auto &state : legal_state) {
        for (auto &pre_st : state_trans[state]) {
          if (j - cnt[state] >= 0) {
            f[i][j][state] += f[i - 1][j - cnt[state]][pre_st];
          }
        }
      }
    }
  }
  ll res = 0;
  for (auto state : legal_state) res += f[n][K][state];
  cout << res << endl;
  return 0;
}
